{% extends "layout.html" %}
{% block title %}Blog Archive{% endblock %}
{% block body %}

  <h1>Blog Archive</h1>

  <ul class=blog-archive>
  {%- for entry in archive %}
    <li><a href="{{ link_to('blog_archive', year=entry.year) }}">{{ entry.year }}</a>
      <ul>
      {%- for subentry in entry.months %}
        <li><a href="{{ link_to('blog_archive', year=entry.year,
                                month=subentry.month) }}">{{ subentry.month_name }}</a>
          — {{ subentry.count }} {{ 'entry' if subentry.count == 1 else 'entries' }}
      {%- endfor %}
      </ul>
  {%- endfor %}
  </ul>
{% endblock %}
